{messages block=$sBlockName}
{if !empty($sSecure)}
<table cellspacing="0" width="100%" class="forumline">
<tr>
    <td class="row-header"><span>{language text='Mod_Admin.important_notice'}</span></td>
</tr>
<tr>
	<th class="gensmall" style="text-align:left;">
	{language text='Mod_Admin.add_to_htaccess'}
	</th>
</tr>
<tr>
	<td class="row1">
	<textarea style="width:98%;" cols="80" rows="4" name="secure" onfocus="this.select();">{$sSecure}</textarea>
	</td>
</tr>
</table>
<br />
{/if}
{if $sJsValMess}
{$sJsValMess}
{/if}
{if $removed}
<div style="padding:6px; font-size:10pt; font-weight:bold;">
	{language text='Mod_Admin.option_deleted'}
</div>
{/if}
<table cellspacing="0" width="100%" class="forumline">
{if count($aOptions) && $sBlockName != 'config_pay'}
<tr>
    <td class="row-header" colspan="4"><span>{language text='Mod_Admin.settings_and_options'}{if getParam('debug')} - {$sBlockName|replace:'config_':''}{/if}</span></td>
</tr>
{*
<tr>
	<td class="catBottom" colspan="3">
	<form method="post" action="{url link='current'}">
		<b>Search</b>: <input type="text" name="q" value="{$q|escape}" />
		<b>Block</b>:
		<select name="qblock">
			<option value="">Current</option>		
			<option value="all"{if $qblock == 'all'} selected="true"{/if}>All</option>
		</select>
		<b>Type</b>:
		<select name="qtype">
			<option value="">Phrase</option>		
			<option value="varname"{if $qtype == 'varname'} selected="true"{/if}>varname</option>
		</select>		
		<input type="submit" value="Go" />
	</form>
	</td>
*}
    <td class="catBottom tright" colspan="4">
    <form method="post" action="{url link='admin.config.options'}">
    	<b>{language text='Mod_Admin.currently_editing'}:</b>
    	<select name="url" onchange="this.form.submit();">
    	{foreach from=$aOptions item=aOption}
		<option value="{$aOption.url}"{if $aOption.selected} selected="true"{/if}>{$aOption.title}</option>
		{/foreach}
		</select>
	</form>
    </td>
</tr>
{else}
<tr>
    <td class="row-header" colspan="4"><span>{$sTitle}{if getParam('debug')} - {$sBlockName|replace:'config_':''}{/if}</span></td>
</tr>
{/if}
<form method="post" action="{$sSubmitUrl}"{if $sJsVal} onsubmit="{$sJsVal}"{/if}>
{if $sHideBlock}
<tr>
    <td class="catBottom" colspan="3">
    {language text='Mod_Admin.error_title'}
    <div style="padding:6px; color:red;">
    	{$sHideBlock}
    </div>
    </td>
</tr>
{/if}
{if count($aItems)}
<tr>
	{if getParam('debug')}
	<th align="center" class="gensmall">
    	Postion
    </th>	
	<th align="center" class="gensmall">
    	{language text='Mod_Admin.variable'}
    </th>
    {/if}
    <th>
    	{language text='Mod_Admin.setting'}
    </th>
    <th>
    	{language text='Mod_Admin.value'}
    </th>
</tr>
{else}
<tr>
	<td class="row1" colspan="4" style="text-align:center;">
		No settings found.
	</td>
</tr>
{/if}
{foreach from=$aItems item=aItem name=aitems}
    <tr{if $aItem.bIsHidden} style="display:none;"{/if}>
    {if getParam('debug')}
	<td class="row1" style="text-align:center;">
		<input type="text" name="pos[{$aItem.code}]" size="3" value="{$aItem.pos}" style="text-align:center;" />
	</td>
	{/if}    
    {if getParam('debug')}
	<td class="row1">
		{$aItem.code}
	</td>
	{/if}
    <td style="width:60%;font-size:8pt;text-align:right;" class="row1">
        <b>{$aItem.title}</b>:
        {if $aItem.description}
        <div style="padding:4px;">
        	<span title="{$aItem.code}">{$aItem.description}</span>
        </div>
        {/if}
        {if $aItem.extra_info}
        <div style="padding:4px;">
        	{$aItem.extra_info}
        </div>
        {/if}
	</td><td style="width:40%;font-size:8pt;" class="row2">
	{if $aItem.settype == 'text' || $aItem.settype == 'TEXT'}
        <input type="text" name="val[{$aItem.code}]" size="40" class="input" value="{$aItem.val}" />
	{elseif $aItem.settype == 'textarea' || $aItem.settype == 'TEXTAREA'}
        <textarea name="val[{$aItem.code}]" cols="30" rows="4">{$aItem.val}</textarea>
	{elseif $aItem.settype == 'boolean' || $aItem.settype == 'BOOLEAN'}
		<label><input type="radio" value="1" name="val[{$aItem.code}]"{if $aItem.val != 0} checked="checked"{/if}/> {language text="yes"} </label>
		<span style="padding-left:4px;"><label><input type="radio" value="0" name="val[{$aItem.code}]"{if $aItem.val == 0} checked="checked"{/if}/> {language text="no"}</label></span>
	{elseif $aItem.settype == 'select' || $aItem.settype == 'SELECT'}
        <select name="val[{$aItem.code}]" style="width:150px;">
        {html_options options=$aItem.select selected=$aItem.val}
        </select>
	{/if}
	{if getParam('debug')}
		[ <a href="{url link='current' did=$aItem.sett_id dcode=$aItem.code}" onclick="if (!sure('')) return false;">{language text='Mod_Admin.delete'}</a> ]
	{/if}
     </td>
    </tr>
{/foreach}
{if !$sHideBlock}
{if count($aItems)}
<tr>
    <td class="catBottom center" colspan="4">
		<span><input type="submit" name="act[save]" value="&gt;&gt; {language text="save_settings"} &gt;&gt;{if $sBlockName == 'config_video' || $sBlockName == 'config_video_player' || $sBlockName == 'config_ffmpeg'} {$sTitle} {/if}&gt;&gt;&gt;&gt;&gt;&gt;" style="cursor:pointer;font-size:10pt;" /></span>
    </td>
</tr>
{/if}
{/if}
</form>
</table>